<template>
    <client-layout :current="1">
        <a-descriptions style="margin-top: 50px;" size="small" :column="1">
            <a-avatar slot="title" :size="64" :src="client['appLogo']" />
            <a-descriptions-item label="应用名称">{{ client['appName'] }}</a-descriptions-item>
            <a-descriptions-item label="应用Id">{{ client['id'] }}</a-descriptions-item>
            <a-descriptions-item label="应用密钥">{{ client['secret'] }}</a-descriptions-item>
            <a-descriptions-item label="回调地址">{{ client['callback'] }}</a-descriptions-item>
            <a-descriptions-item label="应用描述">{{ client['appDesc'] }}</a-descriptions-item>
            <a-descriptions-item label="创建时间">{{ client['createTime'] }}</a-descriptions-item>
        </a-descriptions>
    </client-layout>
</template>

<script>
    import ClientLayout from "../../components/layouts/ClientLayout";
    import { getOauthClient } from '../../apis/index';
    export default {
        components: { ClientLayout },
        props : {
            clientId : { type : String,required : true }
        },
        data(){
            return {
                client : {}
            };
        },
        mounted() {
            let $this = this;
            //  获取客户端信息
            getOauthClient($this.clientId).then(res => $this.client = res.data);
        }
    }
</script>
